package com.baizan.daka.ui.adapter

import android.widget.ImageView
import com.baizan.daka.glide.ImageLoadHelp
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.dianzan.daka.R

class ImgAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item__img) {


    override fun convert(helper: BaseViewHolder, item: String) {
        var imageView = helper.getView<ImageView>(R.id.image_iv)
        ImageLoadHelp.loadImage(imageView, item)
        helper.getView<ImageView>(R.id.delete_iv)
            .setOnClickListener {
                data.remove(item)
                notifyDataSetChanged()
            }
    }


}